package cn.im.qywx.system;
import cn.im.qywx.model.Department;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description: 系统参数
 */
@Configuration
@PropertySource(value = "classpath:SystemParams.properties", encoding = "utf-8")
public class SystemParams {

	// 系统变量
	public static String corpid;

	public static String SECRET_MEETING;
	public static String AGENTID_MEETING;

	public static String UDP_IP;
	public static String UDP_PORT;

	public static String AGENTID_YW;

	/**
	 * 企业微信用户信息接口
	 */
	public static String URL_USER;
	public static String URL_TOKEN;
	public static String URL_SEND;
	public static String URL_DEPT;


	@Value("${CORPID}")
	public void setCorpid(String corpid) {
		SystemParams.corpid = corpid;
	}

	@Value("${SECRET_MEETING}")
	public  void setSecretMeeting(String secretMeeting) {
		SECRET_MEETING = secretMeeting;
	}

	@Value(("${AGENTID_MEETING}"))
	public  void setAgentidMeeting(String agentidMeeting) {
		AGENTID_MEETING = agentidMeeting;
	}

	@Value("${UDP_IP}")
	public  void setUdpIp(String udpIp) {
		UDP_IP = udpIp;
	}

	@Value("${UDP_PORT}")
	public  void setUdpPort(String udpPort) {
		UDP_PORT = udpPort;
	}

	@Value("${AGENTID_YW}")
	public void setAgentidYw(String agentidYw) {
		AGENTID_YW = agentidYw;
	}

	@Value("${URL_USER}")
	public void setUrlUser(String urlUser) {
		URL_USER = urlUser;
	}

	@Value("${URL_TOKEN}")
	public void setUrlToken(String urlToken) {
		URL_TOKEN = urlToken;
	}

	@Value("${URL_SEND}")
	public void setUrlSend(String urlSend) {
		URL_SEND = urlSend;
	}

	@Value("${URL_DEPT}")
	public void setUrlDept(String urlDept) {
		URL_DEPT = urlDept;
	}


//	// 部门和人员列表
	public static List<Department> departments = new ArrayList<Department>();
//
//	// 图文列表(an)
//	public static Map<String, Map<String, List<WeiXinXmlNews>>> SYSTEM_COMMAP; // 键： 功能类型 值： 个地市的map

}
